import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';

import 'logic.dart';

class WebViewPage extends StatelessWidget {
  const WebViewPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final logic = Get.find<WebViewLogic>();
    return Scaffold(
      backgroundColor: const Color(0xffEFEFEF),
      appBar: AppBar(
        leading:
            InkWell(onTap: Get.back, child: const Icon(Icons.arrow_back_ios)),
        title: Text(logic.config.title),
        centerTitle: true,
      ),
      body: WebViewWidget(
        controller: logic.webController,
      ),
    );
  }
}
